#include "Complex.h"
#include "Vec4.h"

void testComplex();
void testVec4();

int main() {
    //testComplex();
    testVec4();
    return 0;
}

void testComplex(){
    Complex a = Complex(1, 2);
    Complex b = 3;
    Complex c = a + 2.3;
    Complex d = 2 + b;
    Complex e = -b - c;

    cout << "a: " << a << endl;
    cout << "b: " << b << endl;
    cout << "c: " << c << endl;
    cout << "d: " << d << endl;
    cout << "e: " << e << endl;
}

void testVec4(){
    float vectors[4] = {1.1, 1.4, 5.14, 6.666};

    Vec4* vec = new Vec4(vectors);
    Vec4 vec2 = *vec;
    Vec4 vec3{};


    cout << "vec: " << *vec << endl;
    cout << "vec2: " << vec2 << endl;
    cout << "Now please enter vec3: ";
    cin >> vec3;
    cout << "vec3: " << vec3 << endl;
    vec2 += vec3 += *vec;
    cout << "vec2 += vec3, vec2: " <<  vec2 << endl;
    float res = vec2 * vec3;
    cout << "vec * vec3: " << res << endl;

    cout << "Enter the elem of vec3 you want to access(0-3): ";
    int i;
    cin >> i;
    if(i >= 0 && i <= 3){
        cout << "vec3[" << i << "]: " << vec3[i] << endl;
        cout << "now enter the value you want to fill at " << i << ": ";
        float val;
        cin >> val;
        vec3[i] = val;
        cout << "after changing, vec3: " << vec3 << endl;
    }

}